<template>
    <div>
        <van-nav-bar title="我的收益" left-text="返回" left-arrow @click-left="onClickLeft" />
    </div>
    <div>
        <van-list :finished="finished" finished-text="没有更多了">
            <van-cell v-for="item in userBalanceList" :key="item" :title="item.changeAmount" :value="item.type"
                :label="item.createTime" />
        </van-list>
    </div>
</template>
<script setup>
import { ref } from 'vue';
import { GetUserBalanceList } from '@/api/pay.js'
const onClickLeft = () => history.back();

const userBalanceList = ref([]);
const finished = ref(false);

getUserBalanceList();

function getUserBalanceList() {
    GetUserBalanceList().then(res => {
        if (res.data.code === 200000) {
            userBalanceList.value = res.data.data
        }
    })
}
</script>